<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2018/1/29
 * Time: 13:02
 */
namespace app\admin\controller;
class Zhifu extends Base{
    public function index(){
        $id = 1;
        $item = db('zhifu')->where('id',1)->find();
        if(request()->isAjax()){
            $params = array_trim(request()->post());
            $status = db('zhifu')->where('id',$id)->update($params);
            if(!$status){
                message("修改失败",'','error');
            }
            message("修改成功",'reload','success');
        }
        return $this->fetch(__FUNCTION__,[
            'item' => $item
        ]);
    }
}